#include<stdio.h>
#include<string.h>
void rightmove(char *a)
{
	int i;
	for(i=0;a[i]!='\0';i++)
	{
		if('A'<=a[i]&&a[i]<='Z')
			if(a[i]+3>'Z')
            	a[i]-=23;
        	else
        		a[i]+=3;
		if('a'<=a[i]&&a[i]<='z')
			if(a[i]+3>'z')
            	a[i]-=23;
        	else
        		a[i]+=3;
	}
}

void inverted(char *a,int length)
{
	int i;
	char temp;
	for (i=0;i<length/2;i++)
    {
        temp=a[i];
        a[i]=a[length-1-i];
        a[length-1-i]=temp;
    }
}

void change(char *a)
{
	int i;
	for(i=0;a[i]!='\0';i++)
	{
		if('A'<=a[i]&&a[i]<='Z')
			a[i]+=32;
		else if('a'<=a[i]&&a[i]<='z')
			a[i]-=32;
	}
}

int main()
{
	char a[50]="";
	int i=0,l;
	gets(a);
	l=strlen(a);
	change(a);
	inverted(a,l);
	rightmove(a);
	puts(a);
	return 0;
}
